//-----------------------------------------------------------------------------
//クラス名：Start.java
//所    属：H3A1 04
//名    前：大瀬碩
//説    明：補講開始時間を保存する
//-----------------------------------------------------------------------------
package supplementary_classes;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;


//@WebServlet("/Start")
public class Start extends HttpServlet {
	private static final long serialVersionUID = 1L;
       

    public Start() {
        super();
    }


	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	}


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/html; charset=UTF-8");
		request.setCharacterEncoding("UTF-8");
		HttpSession session = request.getSession(true);
		
		//開始時間を取得し保存する
		String st = request.getParameter("st");
		String str = request.getParameter("str");
		
		session.setAttribute("st", st);
		session.setAttribute("str", str);
		session.setAttribute("stbtn", "ON");
		session.setAttribute("etbtn", "OFF");
		
		RequestDispatcher rd = request.getRequestDispatcher("SupplementaryClasses.jsp");
		rd.forward(request,response);
	}

}